<extend name="Public/user"/>
<block name="link">
	<title>包裹列表</title>
	<link href="/static/lida/css/tran_style.css" rel="stylesheet" type="text/css" />
	<link href="__CSS__/bootstrap.min.css" rel="stylesheet"/>
	<script src="__JS__/jquery-1.9.1.min.js"></script>
	<script src="__JS__/bootstrap.js"></script>
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
	<link href="__CSS__/grsz-style.css" rel="stylesheet"/>
	<link rel="stylesheet" type="text/css" href="__CSS__/common.css">

</block>
<block name="user-right">
	<!--main_right-->
	<div class="main_r f_fr">
		<div class="user_kx">
			<h3 class="user_kx_title">
				{:lang('setting_user')}

			</h3>
			<ul class="nav nav-tabs" role="tablist">
					<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">{:lang('default_set')}</a></li>
					<li role="presentation" ><a href="{:url('User/setpass')}" >{:lang('change_pass')}</a></li>
					<li role="presentation" ><a href="{:url('User/settouxiang')}" >{:lang('change_avatar')}</a></li>
			</ul>


			<!-- Tab panes -->
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="home">
					<form class="form-horizontal" method="post" action="{:url('User/setting')}" style="margin-top:20px;">
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('username')}:</label>
							<div class="col-sm-8">
								<span class="f18 c-h">{$user.username}</span>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('email')}:</label>
							<div class="col-sm-8">
								<span class="f18 c-h"><empty name='user.email'><input type="text" name="email" value="{$user.email}"><else /> {$user.email}</empty></span>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('nickname')}:</label>
							<div class="col-sm-8">
								<span><input type="text" name="nickname" value="{$user.nickname}"></span>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-4 control-label">{:lang('true_name')}:</label>
							<div class="col-sm-8">
								<span><input type="text" name="true_name" value="{$user.true_name}"></span>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('sex')}:</label>
							<div class="col-sm-8">
								<label class="radio-inline">
									<input type="radio" name="sex" value="1" <eq name="user.sex" value="1">checked</eq> <eq name="user.sex" value="0">checked</eq>> {:lang('boy')}
								</label>
								<label class="radio-inline">
									<input type="radio" name="sex" value="2"  <eq name="user.sex" value="2">checked</eq>> {:lang('girl')}
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('mobile')}:</label>
							<div class="col-sm-8">
								<input type="text" name="mobile" value="{$user.mobile}">
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">{:lang('qqnumber')}:</label>
							<div class="col-sm-8">
								<input type="text" name="qq" value="{$user.qq}">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-4 col-sm-8">
								<input type="hidden" name="uid" value="{$user.uid}"></label><span><input type="submit"  class="btn btn-default red c-w w70" value="{:lang('submit')}">
							</div>
						</div>
					</form>
				</div>
				<div role="tabpanel" class="tab-pane" id="profile">
					<form class="form-horizontal" style="margin-top:20px;">
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">原密码:</label>
							<div class="col-sm-8">
								<input type="email" class="form-control w150" id="inputEmail3">
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">新密码:</label>
							<div class="col-sm-8">
								<input type="email" class="form-control w150" id="inputEmail3">
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-4 control-label">确认密码:</label>
							<div class="col-sm-8">
								<input type="email" class="form-control w150" id="inputEmail3">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-4 col-sm-8">
								<button type="submit" class="btn btn-default red c-w w70">提交</button>
							</div>
						</div>
					</form>
				</div>
				<div role="tabpanel" class="tab-pane" id="messages">
					<div class="menu_xuigai f_fl">
						<form id="pic" class="update-pic cf w200 f_fl" method="post" >
							<div class="form-group w200" style="background:#FFF; height:200px;">
								<label for="exampleInputFile" class="c-sh" style="margin-left:30px; margin-top:30px;" >上传头像</label>
								<input type="file" id="exampleInputFile" style="margin-left:30px;">
								<p class="help-block" style="margin-left:20px;">支持JPG,图片小于1MB,nhib</p>
							</div>
						</form>
						<div class="xiugai f_fl">
							<div class="tyulan">
								头像预览
							</div>
							<div class="crop crop100">
								<img id="crop-preview-100" alt="" src="">
							</div>
							<div class="crop crop60">
								<img id="crop-preview-60" alt="" src="">
							</div>
							<button type="submit" class="btn btn-default uppic-btn save-pic w100">提交</button>
							<button type="submit" class="btn btn-default uppic-btn reupload-img w100">重新上传</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</block>
<block name="javascript">
	<script type="text/javascript">
		$(function(){
			$('form').submit(function(){
				var self = $(this);
				$.post(self.attr("action"), self.serialize(), success, "json");
				return false;
				function success(data){
					if (data.status) {
						//$.thinkbox.success(data.info);
						alert('修改成功!');
						//setTimeout(jumpurl(data.url),1500);
					}else{
						alert('修改失败,信息重复添加!');
						//$.thinkbox.error(data.info);
					};
				}
			})
		})
	</script>
</block>